1. Field of the Invention
The present invention relates to a semiconductor integrated circuit. Specifically, the present invention relates a semiconductor integrated circuit in which processing of internal date is required when returning from a standby state.
2. Description of Related Art
Semiconductor integrated circuits having a low power consumption mode such as a stand-by function or a resume function have been known. When the power-supply is stopped, an internal state is lost except for data stored in a nonvolatile memory. Therefore, the internal state should be retained by temporarily saving the internal state before entering a stand-by state so that the system state can be retained before and after the stand-by state.
For example, Patent document 1 (Japanese Unexamined Patent Application Publication 2007-157027) discloses a semiconductor integrated circuit provided with a function of stopping power supply to target circuits and saving their internal state in a nonvolatile memory before stopping power supply to the target circuits. Then, power supply is restarted in response to an external interrupt signal, and the internal state is restored to the target circuits.
Specifically, when an interrupt signal, which serves as a trigger for the restart of the target circuits (for example, CPU), input to a back-up control circuit, the back up control circuit restarts the power supply by controlling switches. Further, the back-up control circuit brings the target circuits into the recovery state in which a scan-chain is set. Subsequently, the back-up control circuit provides internal node data stored in the back-up memory to the sub scan chain to restore the internal state. When the internal state of the target circuits is recovered, the back-up control circuit cancels the recovery state of the target circuits and restarts the target circuits. The target circuits restart their operations.
In this manner, the internal state of the target circuits is identical before the power-off and after the subsequent power-on. Therefore, even if the power is turned off, continuous data processing can be performed from the same state as before the power-off after the resumption of power supply.
However, during the recovering operation from the standby state, the internal state of the target circuits is different from the normal state and the restore of the internal state has not completed. Therefore, if any operational signal is input to the target circuit at some midpoint in the recovering process, the system would hang up or operate improperly. Therefore, until the recovering process has been completed, the operational signal is masked in order to prevent any input to the target circuits and thereby to avoid the improper operation.
Details are explained hereinafter with reference to FIG. 7. Referring to FIG. 7, the target circuit enters a stand-by mode at a time T00 and resumes a normal operation at a time T02. In this case, signals input to the target circuit is masked during the stand-by mode from the time T00 to the time T02. In other words, as shown in FIG. 7, a signal level of Mask Enable is High from the time T00 to the time T02, and the signal Mask is cancelled at the time T02. As an interrupt command, which serves as a trigger of resumption, is issued at the time T01, the back-up control circuit starts resumption preprocessing for restoring the internal state of the target circuit. Meanwhile, until the time T02 at which the resumption preprocessing has been completed, the interrupt command input to the target circuit is masked. When the resumption preprocessing has been completed and the masking of the signal canceled at the time T02, an operation command is input to the target circuit and the target circuit starts its operation. In this manner, any false operation can be avoided because no external signal is input to the target circuit during the stand-by mode. After the resumption preprocessing has been completed, the target circuit can start to carry out instructed operations properly.